package com.example.viewpageapplication.viewpage;

import androidx.appcompat.app.AppCompatActivity;
import androidx.viewpager.widget.ViewPager;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;

import com.example.viewpageapplication.R;
import com.example.viewpageapplication.adapter.ViewPageVadapter;
import com.example.viewpageapplication.entity.BaseT;

import java.util.ArrayList;
import java.util.List;

public class ViewPageMainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_view_page_main);

        List<BaseT> baseTList = BaseT.getDefalutList();
        ViewPager viewPagerm = findViewById(R.id.vp_sp);
        ViewPageVadapter viewPageVadapter = new ViewPageVadapter(this,baseTList);
        viewPagerm.setAdapter(viewPageVadapter);

    }
}